<template>
	<x-border title="订单详情" type="primary" class="admin-order-edit">
		<div class="order-edit" v-if="viewModel">
			<div class="user-management_left">
				<Left :viewModel="viewModel"></Left>
			</div>
			<div class="user-management_right">
				<Right :viewModel="viewModel" @initChang="initChang"></Right>
			</div>
		</div>
		<div v-else v-loading="isLoading"></div>
	</x-border>
</template>
<script>
	import Left from './widgets/left.vue'
	import Right from './widgets/right.vue'
	import ala from 'ala'
	export default {
		components: {
			Left,
			Right
		},
		data() {
			return {
				viewModel: '',
				isLoading: true
			}
		},
		mounted() {
			this.init()
		},
		methods: {
			async init() {
				let para = {
					id: this.$route.query.id,
					loginuserid: this.$ala.urlId()
				}
				var response = await this.$ala.httpGet('api/OrderAdmin/Show', para)
				this.viewModel = response
				this.isLoading = false
			},
			initChang() {
				this.init()
			}
		}
	}
</script>
<style rel="stylesheet/scss" lang="scss">
	@import "./styles/style.scss";
</style>